from selenium import webdriver
import time
from selenium.webdriver.common.by import By
wd = webdriver.Chrome()
url="http://www.baidu.com"
wd.get(url)
time.sleep(2)
sousuo = wd.find_element(By.ID,"kw").send_keys('周杰伦')
time.sleep(2)
baiduyixia = wd.find_element(By.XPATH,'//*[@id="su"]').click()
time.sleep(2)
jc_bottom = "document.documentElement.scrollTop=100000"
wd.execute_script(jc_bottom)
time.sleep(2)
xiayiye=wd.find_element(By.CSS_SELECTOR,'#page> div > a.n').click()
time.sleep(2)
wd.back()
time.sleep(2)
wd.forward()
time.sleep(2)
print(wd.page_source)
wd.close()